import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:industry_net/base/common/util.dart';
import 'package:industry_net/pages/news/main/models/news.dart';

import '../controller.dart';

class NewsTextCell extends StatelessWidget {
  NewsTextCell({Key? key, required this.md}) : super(key: key);
  final NewsModel md;
  final controller = Get.find<ContentController>();
  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () => controller.actionCellClick(md),
      child: Container(
        // height: 100.r,
        padding: EdgeInsets.symmetric(horizontal: gap12, vertical: gap10),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              '退伍军人“玩转”无人农场',
              style: pfSCStyle(color: ColorsUtil.title, fontSize: font15),
            ),
            SizedBox(
              height: 5.r,
            ),
            Row(
              children: [
                Text(
                  '央广网',
                  style: pfMediumStyle(
                      color: ColorsUtil.content, fontSize: font12),
                ),
                SizedBox(
                  width: gap10,
                ),
                Text(
                  md.createTimeStr,
                  style: pfMediumStyle(
                      color: ColorsUtil.content, fontSize: font12),
                ),
                SizedBox(
                  width: gap10,
                ),
                Text(
                  '9999次浏览',
                  style: pfMediumStyle(
                      color: ColorsUtil.content, fontSize: font12),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
